package com.xiaolin.web.listener;

import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * @ClassName HelloServletContextListener
 * @Description TODO
 * @Detail 监听器
 * @Author MyPC
 * @Date 2020/9/28
 * @Version 1.0
 */
//@WebListener
//@Component
public class HelloServletContextListener implements ServletContextListener{
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("ServletContex创建。。");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("ServletContex销毁。。");
    }
}
